package com.b.domain;

import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 用户表
    */
@Document(indexName = "user")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    /**
    * 用户ID
    */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
    * 头像
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String avatar;

    /**
    * 昵称
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String nickname;

    /**
    * 性别
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String gender;

    /**
    * 出生年月
    */
    @Field(type = FieldType.Date, index = false , store = true)
    private Date birthday;

    /**
    * 个性签名
    */
    @Field(type = FieldType.Text, index = true , store = true)
    private String signature;

    /**
    * 硬币数
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer coins;

    /**
    * 关注数
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer followCount;

    /**
    * 粉丝数
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer followerCount;

    /**
    * 动态数
    */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer dynamicCount;

    /**
    * 创建时间
    */
    @Field(type = FieldType.Date, index = false , store = true)
    private Date createTime;
}